<template>
    <div class="body-bg">
        <a class="action left"></a>
        <a class="action middle"></a>
        <a class="action right"></a>
        <div id="im-container">
            <img id="airplane" src="../assets/img/index/airplane.png">
        </div>
        <el-row class="form-context">
            <el-col :span="6">
            </el-col>
            <el-col :span="6">
            </el-col>
            <el-col :span="6">
                <Regist v-if="config.table==1" :changeShow="changeShow" />
                <Login v-if="config.table==2" :changeShow="changeShow" />
                <FindPassword v-if="config.table==3" :changeShow="changeShow" />
            </el-col>
            <el-col :span="6">
            </el-col>
        </el-row>
    </div>
</template>

<script>

import Login from '../components/user/Login.vue'
import Regist from '../components/user/Regist.vue'
import FindPassword from '../components/user/FindPassword.vue'
import { reactive } from 'vue'
export default {

    setup() {
        //改变显示的组件 登录/注册
        const changeShow = (v) => {
            config.table = v;
        }
        let config = reactive({
            table: 2
        })
        return {
            config, changeShow
        }
    },
    components: { Login, Regist,FindPassword }

}
</script>

<style  scoped>
.el-row {
    z-index: 999;
}

* {
    transition: all 0.25s linear;
}

html {
    width: 100%;
    height: 100%;
}

@keyframes back {
    from {
        background-position-y: bottom;
    }

    to {
        background-position-y: top;
    }
}

.body-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    background: url(".././assets/img/index/airplane-back.jpg");
    background-size: cover;
    animation: back 20s infinite;
    -moz-animation: back 20s infinite;
    -o-animation: back 20s infinite;
    animation-timing-function: linear;
    -webkit-animation-timing-function: linear;
    /* The background animation */

    -moz-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    overflow: hidden;
}


#im-container {
    width: 35%;
    height: 40%;
    max-width: 300px;
    max-height: 330px;
    position: absolute;
    top: 40%;
    left: 20%;
    margin: auto;
    background: url(".././assets/img/index/airplane-shadow.png") no-repeat bottom right;
    background-size: 20%;
    transition: all 10s cubic-bezier(0.5, 0.025, 0.005, 2);
    -webkit-transition: all 10s cubic-bezier(0.5, 0.025, 0.005, 2);
    -moz-transition: all 10s cubic-bezier(0.5, 0.025, 0.005, 2);
    -o--transition: all 10s cubic-bezier(0.5, 0.025, 0.005, 2);
}

#airplane {
    display: block;
    /* The hover animation */

    width: 80%;
    height: auto;
    margin: auto;
}

.action {
    position: absolute;
    z-index: 1;
    height: 100%;
}

.action.left {
    width: 20%;
}

.action.right {
    width: 60%;
}

.action.middle {
    width: 20%;
    /* The direction anchors */

    right: 0;
    left: 0;
    margin-left: 20%;
}

.left {
    left: 0;

}

.middle {}

.right {
    right: 0;

}

.right:hover~#im-container {
    transform: translateX(120%) rotateZ(2deg);
}

.left:hover~#im-container {
    transform: translateX(-120%) rotateZ(-2deg);
}

#hint {
    position: fixed;
    z-index: 9;
    bottom: 10%;
    left: 0;
    right: 0;
    width: 100%;
    height: 50px;
    margin: auto;
    font-family: 'Open sans', 'Lato', 'Helvetica', sans-serif;
    font-size: 11px;
    color: white;
    text-align: center;
    line-height: 1;
}

#hint * {
    padding: 0px;
    margin: 0px;
}

#hint h3 {
    font-weight: 100;
}

.credit {
    font-weight: 800;
}

@media all and (max-height: 500px) {
    #hint {
        bottom: 75%;
        line-height: 1;
        font-size: 14px;
    }

    #hint p {
        display: none;
    }

    #airplane {
        height: 70% !important;
        display: block;
        width: auto;
    }
}
</style>



